package com.wing.qualityTesting.dao;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wing.qualityTesting.model.entity.QualityTestingRecordValue;
import com.wing.qualityTesting.model.response.QualityDetailValueInfoVo;
import com.wing.qualityTesting.model.response.QualityTestingRecordValueVO;
import com.wing.qualityTesting.model.response.WorkOrderQualityTestingTaskNeedVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 质检参数结果表-Dao
 *
 * @author
 */
@Mapper
public interface QualityTestingRecordValueDao extends BaseMapper<QualityTestingRecordValue> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<QualityTestingRecordValueVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<QualityTestingRecordValueVO> list4app(@Param("page") Page<QualityTestingRecordValueVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    QualityTestingRecordValueVO get4appById(Long id);

    /**
     * 查询检测项检测值
     * @param recordDetailId
     * @return
     */
    List<QualityDetailValueInfoVo> listRecordValues(@Param("recordDetailId") Long recordDetailId);

    /**
     * 查询添加研发记录需要的信息
     * @param qualityTestingTaskId
     * @return
     */
    WorkOrderQualityTestingTaskNeedVo getNeedInfoBy(@Param("qualityTestingTaskId") Long qualityTestingTaskId);

    /**
     * 查询未质检的个数
     * @param taskId
     * @return
     */
    Integer getNoQualityCount(@Param("taskId") Long taskId);
}
